The production of animated features involves the use of computer graphics techniques to produce a visually appealing image that can be used to convey an element of a story. One of the challenges in rendering images for use in animated features is balancing the desire for a visually appealing image of a character or object with the practical issues involved in allocating the computational resources required to produce the image in a feature film environment. Further, although the image need not be fully realistic in all cases, it is desirable that the artist producing the image be able to modify certain attributes of the rendered image, typically by adjusting input parameters of the graphics software, to obtain a visually appealing image that suits the purposes of the story line.
In computer animation graphics, a rendering program renders an image by producing pixels from a scene description. Scene description input files contain a three dimensional geometric description of all objects in the scene, as well as a virtual-camera description and light descriptions. In a simple rendering process, an element in the scene or image is modeled and then the software models how that element appears to a viewer (at a specified location and viewing angle) when light (typically multiple light sources) illuminates the element or causes the element to be shaded. A shader program may be associated with each object in the scene and tagged to each light source to compute shading values for the object. Shading values may be related to properties such as color, shadow, smoke, reflections, texture, and the like.
Before executing a shader program, a series of shading points are defined on an object to be shaded. Each shading point is represented as an object with a set of properties. Example properties include the surface normal (N) at the shading point, the light direction, the light color, the light position and texture maps associated with surface coordinates (u, v) to represent, for example, roughness, shininess or other surface characteristics. The shader program operates on these values and produces output values at each shading point. The rendering program collects the outputs on all shading points and then samples them, interpolating as necessary, to populate pixels for an output frame buffer.
An image in a scene may be represented by a directed acyclic graph (DAG) including input parameters and output values. The output values are determined by performing operations on the input parameters. Example operations include calculations (e.g., summation, multiplication and dot product operations) and look-up operations (e.g., referencing a texture map). The operations are depicted in the DAG as nodes on paths between the input parameters and the output values. For example, a look-up operation may be performed using a texture map and surface coordinates (u, v) as input parameters to identify a texture color value. In another example, a surface normal and light direction may be combined using a dot product operation to calculate a light intensity value at the shading point. A multiplication operation may be performed on the light intensity value and a light color value to produce an attenuated light color value. A component multiplication operation may then be performed on the attenuated light color value and the texture color value to calculate a surface color value at the shading point.
During scene creation, an animator may modify different input parameters to generate a visually appealing image. For example, the animator may modify the light color to illuminate the image with a warmer color. In order to observe how the modified light color affects the image, the rendering program determines the new surface color value by re-evaluating the entire DAG. Since the animator may modify many different input parameters and re-render the image hundreds of times before completing the image, re-evaluation of the entire DAG after each input parameter modification drains computational resources and, hence, is costly and inefficient.
Therefore, what is needed is a method for efficiently evaluating a DAG when re-rendering an image.